<script type="text/javascript">
    function removeConfirmation()
    {
        var answer = confirm("Czy na pewno chcesz usunąć tego wydawcę?");
        return answer;
    }
</script>
<h2>Edytuj wydawców</h2>
<table>
    <thead>
        <th>Wydawca</th>
        <th>Akcja</th>
    </thead>
    <?php
        foreach ($this->data as $publisher):
    ?>
        <tr>
            <form action="<?=$this->formAddress;?>" method="post">
            <input type="hidden" name="id" value="<?=$publisher["publisherName"];?>" />
            <td>
                <?=$publisher["publisherName"];?>
            </td>
            <td>
                <input type="submit" name="action" value="Usuń" onclick="return removeConfirmation()" 
                       <?=($publisher['count'] > 0) ? 'disabled' : '' ?>/>
            </td>
            </form>
        </tr>
    <?php
        endforeach;
    ?>
</table>
<h2>Dodaj wydawcę</h2>
<?=$this->form->renderForm();?>